<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

    <!-- set the output properties -->
    <xsl:output method="html"/>

    <xsl:template match="/Detectors">
        <html>
            <head>
                <META HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8" />
                <style type="text/css"> 
                    BODY
                    {
                    FONT-SIZE:10pt;
                    MARGIN-TOP:0;
                    FONT-FAMILY:verdana,宋体;
                    }
                    
                    HR
                    {
                    border:1px solid #999999; 
                    height: 0;
                    width:100%;
                    }

                    H1
                    {
                    BACKGROUND-COLOR: #003366;
                    BORDER-BOTTOM: #336699 6px solid;
                    COLOR: #ffffff;
                    FONT-SIZE: 14pt;
                    FONT-WEIGHT: bold;
                    MARGIN: 0em 0em 0em -20px;
                    PADDING-BOTTOM: 8px;
                    PADDING-LEFT: 30px;
                    PADDING-TOP: 16px;

                    FONT-FAMILY:Arial, 黑体;
                    }

                    H2
                    {
                    font-size:12pt;
                    font-weight:bold;
                    }

                    H3
                    {
                    font-size:11pt;
                    font-weight:bold;
                    }

                    H4
                    {
                    font-size:10pt;
                    font-weight:bold;
                    }

                    UL
                    {
                    COLOR: #000000;
                    FONT-SIZE: 70%;
                    LIST-STYLE: square;
                    MARGIN-BOTTOM: 0pt;
                    MARGIN-TOP: 0pt
                    }
                    OL
                    {
                    COLOR: #000000;
                    FONT-SIZE: 70%;
                    LIST-STYLE: square;
                    MARGIN-BOTTOM: 0pt;
                    MARGIN-TOP: 0pt
                    }
                    LI
                    {
                    LIST-STYLE: square;
                    MARGIN-LEFT: 0px
                    }

                    TABLE
                    {
                    background-color: #cece9c;
                    text-align:center;
                    padding:2px;
                    }

                    TH
                    {
                    FONT-WEIGHT: bold;
                    background-color: #f0f0e0;
                    color:black;
                    text-align:center;
                    padding:2px;

                    }

                    TD
                    {
                    background-color:white;
                    color:black;
                    text-align:left;
                    padding:2px;
                    }

                    P {
                        padding-left:20px;
                    }
                </style>
            </head>
            <body>
                <h1 style="width:100%">WINDUMP 扫描报告</h1>
                <h2>系统信息</h2>
                <p>
                    <table border="0" cellpadding="3" cellspacing="1">
                        <tr>
                            <th>Windump</th>
                            <td> <xsl:value-of select="sysinfo/@WindumpVersion" /> </td>
                        </tr>
                        <tr>
                            <th>扫描时间</th>
                            <td><xsl:value-of select="sysinfo/@ScanTimeStame" /></td>
                        </tr>
                        <tr>
                            <th>计算机名</th>
                            <td><xsl:value-of select="sysinfo/@ComputerName" /></td>
                        </tr>
                        <tr>
                            <th>用户名</th>
                            <td><xsl:value-of select="sysinfo/@UserName" /></td>
                        </tr>
                    </table>
                </p>

                <h2>Windows Credential 扫描</h2>
                <p>
                    <table border="0" cellpadding="3" cellspacing="1">
                        <tr>
                            <th>目标</th>
                            <th>用户名</th>
                            <th>凭据/密码</th>
                        </tr>
                        <xsl:for-each select="cred/Item">
                            <tr>
                                <td> <xsl:value-of select="@TargetName" /> </td>
                                <td> <xsl:value-of select="@UserName" /> </td>
                                <td> <xsl:value-of select="@Credential" /> </td>
                            </tr>
                        </xsl:for-each>
                    </table>
                </p>

                <h2>Windows LSA 子系统</h2>
                <p>
                    Windows 登陆密码：<xsl:value-of select="lsa/DefaultPassword/@Password" />
                </p> 
                <p>
                    <table border="0" cellpadding="3" cellspacing="1">
                        <tr><td colspan="2">Windows 拨号连接帐号</td></tr>
                        <tr>
                            <th>帐号</th>
                            <th>密码</th>
                        </tr>
                        <xsl:for-each select="lsa/RASSecrets/Item">					
                            <tr>
                                <td> <xsl:value-of select="@Account" /> </td>
                                <td> <xsl:value-of select="@Password" /> </td>
                            </tr>
                        </xsl:for-each>
                    </table>
                </p>

                <h2>Internet Explorer 扫描</h2>
                <p>
                    <table border="0" cellpadding="3" cellspacing="1" >
                        <tr>
                            <th>提供者</th>
                            <th>资源</th>
                            <th>帐号</th>
                            <th>密码</th>
                        </tr>
                        <xsl:for-each select="pstore/IE/Item">
                            <tr>
                                <td>IE6</td>
                                <td> <xsl:value-of select="@Host" /> </td>
                                <td> <xsl:value-of select="@Account" /> </td>
                                <td> <xsl:value-of select="@Password" /> </td>
                            </tr>
                        </xsl:for-each>

                        <xsl:for-each select="ie7/Item">
                            <tr>
                                <td>IE7</td>
                                <td> <xsl:value-of select="@Host" /> </td>
                                <td> <xsl:value-of select="@Account" /> </td>
                                <td> <xsl:value-of select="@Password" /> </td>
                            </tr>
                        </xsl:for-each>
                    </table>
                </p>


                <h2>电子邮件帐号扫描</h2>                
                <p>
                    <table border="0" cellpadding="3" cellspacing="1" >
                        <tr>
                            <th>提供者</th>
                            <th>服务器</th>
                            <th>帐号</th>
                            <th>密码</th>
                        </tr>
						<xsl:for-each select="email_accounts/item">
                            <tr>
								<td> <xsl:value-of select="../@name" /> </td>
                                <td> <xsl:value-of select="@host" /> </td>
                                <td> <xsl:value-of select="@account" /> </td>
                                <td> <xsl:value-of select="@password" /> </td>
                            </tr>
                        </xsl:for-each>
                    </table>
                </p>


				<h2>Internet Explorer 文本框扫描</h2>				
				<xsl:for-each select="html_input/page">
					<p>
						<table border="0" cellpadding="3" cellspacing="1" >
							<tr>
								<td colspan="2"><xsl:value-of select="@url" /></td>
							</tr>
							<tr>
								<th>名称/ID</th>
								<th>值</th>
							</tr>
							<xsl:for-each select="item">
								<tr>
									<td> <xsl:value-of select="@name" /> </td>
									<td> <xsl:value-of select="@value" /> </td>
								</tr>
							</xsl:for-each>
						</table>
					</p>
				</xsl:for-each>

                <h2>Mozilla Firefox 扫描</h2>
                <p>
                    <table border="0" cellpadding="3" cellspacing="1" >
                        <tr>
                            <th>URL</th>
                            <th>帐号</th>
                            <th>密码 </th>
                        </tr>
                        <xsl:for-each select="firefox/item">
                            <tr>
                                <td> <xsl:value-of select="@url" /> </td>
                                <td> <xsl:value-of select="@account" /> </td>
                                <td> <xsl:value-of select="@password" /> </td>
                            </tr>
                        </xsl:for-each>
                    </table>
                </p>

                <h2>Alibaba TradeManager 扫描</h2>
                <p>
                    <table border="0" cellpadding="3" cellspacing="1" >
                        <tr>
                            <th>帐号</th>
                            <th>密码 </th>
                        </tr>
                        <xsl:for-each select="trademanager/item">
                            <tr>
                                <td> <xsl:value-of select="@account" /> </td>
                                <td> <xsl:value-of select="@password" /> </td>
                            </tr>
                        </xsl:for-each>
                    </table>
                </p>

                <hr/>
				<div>Windump 2000 - 2007 版权所有 <a href="mailto:windump1@gmail.com">Oldrev</a>，保留所有权利。</div>
            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>
